diff --git a/common/image.c b/common/image.c
index e22c974..f3dd647 100644
--- a/common/image.c
+++ b/common/image.c
@@ -65,7 +65,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static image_header_t* image_get_ramdisk (ulong rd_addr, uint8_t arch,
+static const image_header_t* image_get_ramdisk (ulong rd_addr, uint8_t arch,
 						int verify);
 #else
 #include "mkimage.h"
@@ -166,7 +166,7 @@
 /*****************************************************************************/
 /* Legacy format routines */
 /*****************************************************************************/
-int image_check_hcrc (image_header_t *hdr)
+int image_check_hcrc (const image_header_t *hdr)
 {
 	ulong hcrc;
 	ulong len = image_get_header_size ();
@@ -181,7 +181,7 @@
 	return (hcrc == image_get_hcrc (hdr));
 }
 
-int image_check_dcrc (image_header_t *hdr)
+int image_check_dcrc (const image_header_t *hdr)
 {
 	ulong data = image_get_data (hdr);
 	ulong len = image_get_data_size (hdr);
@@ -203,7 +203,7 @@
  * returns:
  *     number of components
  */
-ulong image_multi_count (image_header_t *hdr)
+ulong image_multi_count (const image_header_t *hdr)
 {
 	ulong i, count = 0;
 	uint32_t *size;
@@ -236,7 +236,7 @@
  *     data address and size of the component, if idx is valid
  *     0 in data and len, if idx is out of range
  */
-void image_multi_getimg (image_header_t *hdr, ulong idx,
+void image_multi_getimg (const image_header_t *hdr, ulong idx,
 			ulong *data, ulong *len)
 {
 	int i;
@@ -272,7 +272,7 @@
 	}
 }
 
-static void image_print_type (image_header_t *hdr)
+static void image_print_type (const image_header_t *hdr)
 {
 	const char *os, *arch, *type, *comp;
 
@@ -286,7 +286,7 @@
 
 /**
  * image_print_contents - prints out the contents of the legacy format image
- * @hdr: pointer to the legacy format image header
+ * @ptr: pointer to the legacy format image header
  * @p: pointer to prefix string
  *
  * image_print_contents() formats a multi line legacy image contents description.
@@ -296,8 +296,9 @@
  * returns:
  *     no returned results
  */
-void image_print_contents (image_header_t *hdr)
+void image_print_contents (const void *ptr)
 {
+	const image_header_t *hdr = (const image_header_t *)ptr;
 	const char *p;
 
 #ifdef USE_HOSTCC
@@ -363,10 +364,10 @@
  *     pointer to a ramdisk image header, if image was found and valid
  *     otherwise, return NULL
  */
-static image_header_t* image_get_ramdisk (ulong rd_addr, uint8_t arch,
+static const image_header_t *image_get_ramdisk (ulong rd_addr, uint8_t arch,
 						int verify)
 {
-	image_header_t *rd_hdr = (image_header_t *)rd_addr;
+	const image_header_t *rd_hdr = (const image_header_t *)rd_addr;
 
 	if (!image_check_magic (rd_hdr)) {
 		puts ("Bad Magic Number\n");
@@ -628,13 +629,13 @@
  */
 int genimg_get_format (void *img_addr)
 {
-	ulong		format = IMAGE_FORMAT_INVALID;
-	image_header_t	*hdr;
+	ulong format = IMAGE_FORMAT_INVALID;
+	const image_header_t *hdr;
 #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT)
-	char		*fit_hdr;
+	char *fit_hdr;
 #endif
 
-	hdr = (image_header_t *)img_addr;
+	hdr = (const image_header_t *)img_addr;
 	if (image_check_magic(hdr))
 		format = IMAGE_FORMAT_LEGACY;
 #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT)
@@ -685,7 +686,7 @@
 		/* get data size */
 		switch (genimg_get_format ((void *)ram_addr)) {
 		case IMAGE_FORMAT_LEGACY:
-			d_size = image_get_data_size ((image_header_t *)ram_addr);
+			d_size = image_get_data_size ((const image_header_t *)ram_addr);
 			debug ("   Legacy format image found at 0x%08lx, size 0x%08lx\n",
 					ram_addr, d_size);
 			break;
@@ -762,7 +763,7 @@
 {
 	ulong rd_addr, rd_load;
 	ulong rd_data, rd_len;
-	image_header_t *rd_hdr;
+	const image_header_t *rd_hdr;
 #if defined(CONFIG_FIT)
 	void		*fit_hdr;
 	const char	*fit_uname_config = NULL;
@@ -1085,9 +1086,9 @@
 	puts (" - must RESET the board to recover.\n");
 }
 
-static image_header_t *image_get_fdt (ulong fdt_addr)
+static const image_header_t *image_get_fdt (ulong fdt_addr)
 {
-	image_header_t *fdt_hdr = (image_header_t *)fdt_addr;
+	const image_header_t *fdt_hdr = (const image_header_t *)fdt_addr;
 
 	image_print_contents (fdt_hdr);
 
@@ -1283,8 +1284,8 @@
 int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images,
 		char **of_flat_tree, ulong *of_size)
 {
+	const image_header_t *fdt_hdr;
 	ulong		fdt_addr;
-	image_header_t	*fdt_hdr;
 	char		*fdt_blob = NULL;
 	ulong		image_start, image_end;
 	ulong		load_start, load_end;
